#pragma once
#include <RichEdit.h>
#include <Oleidl.h>
#include <Richole.h>
#include <string>
#include "ImageDataObject.h"

class CRichEdit
{
private:
	static const DWORD ID_EDIT = 100;
	HWND m_hEditWnd;
	bool m_bReadOnly;
	IRichEditOle *m_pRichEditOle;

	void PopulateRangeOfLine(int line, CHARRANGE &charRange) const;
public:
	CRichEdit(HWND hParent, HINSTANCE hInstance, bool bReadOnly = true );
	virtual ~CRichEdit(void);

	std::wstring GetText() const;
	HWND GetHWnd() const { return m_hEditWnd; }
	void SetLineColor(int lineNumber, COLORREF color);
	void AppendText(const std::wstring &text);
	void Clear();
	void SetSize(const RECT &rect);
	void InsertBitmap(HBITMAP hBitmap);
	void Copy();
};


